package com.pig.live.common.utils;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;

/**
 * 文件读取、写入操作工具
 *
 * @author gaojx
 * @since 2020/8/9
 */
public class FileUtils {

    private static final Logger logger = LoggerFactory.getLogger(FileUtils.class);

    /**
     * 读取文件流
     * @param in
     * @return
     */
//    public static String readFromInputStream(InputStream in){
//        BufferedReader reader = null;
//        String tempString;
//        StringBuilder resultString = null;
//
//        try {
//            reader = new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8));
//            resultString = new StringBuilder();
//            while ((tempString = reader.readLine()) !=null){
//                resultString.append(tempString);
//            }
//            reader.close();
//        }
//
//    }
}
